<%@ page language="java" contentType="text/html; charset=UTF-8"
  pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh-CN">

<head>
<title>陆老师小课堂</title>
<%@ include file="/WEB-INF/include/meta.jsp"%>
<%@ include file="/WEB-INF/include/css.jsp"%>
</head>
<!-- end header -->

<body>
  <div class="page-group">
    <div class="page page-current bg-light-gray">
      <div class="content">
        <header class="bar bar-nav dark-header">
          <a href="${ctx.host}/oral-groups/${round.group.id}" class="icon icon-left pull-left" style="color: #fff;"></a>
          <h1 class="title">${round.name}</h1>
        </header>
        <div class="content oral-view" style="background-color: #FFF">
          <div class="content-block real-test hide">
            <div class="clock-warp">
              <div class="time text-center">
                <span class="minute">00</span>:<span class="second">00</span>
              </div>
            </div>
            <h1 class="text-center question-viewer"></h1>
            <div class="row">
              <!-- <div class="col-50">
                <a href="javascript:void(0);" class="button button-big button-fill button-danger btn-fail selector" data-selector="false">不熟练</a>
              </div> -->
              <div class="col-100">
               <a href="javascript:void(0);" class="button button-big button-fill selector" data-selector="true" style="margin:0 2rem;">下一题&nbsp;&nbsp;&nbsp;<i class="fa fa-clock-o" aria-hidden="true"></i>&nbsp;<span class="seconds">0</span></a>
              </div>
            </div>
          </div>
          <div class="login-warp">
            <p style="padding: .5rem 1.5rem; color: #999; font-size: .7rem;">${round.description}</p>
            <c:choose>
              <c:when test="${not empty records}">
                <div class="record-list">
                  <p style="padding-bottom: 0px; margin: .4rem .75rem; text-align: left; color: #666; font-size: .6rem;">最好成绩</p>
                  <div class="card">
                    <div class="card-content">
                      <div class="card-content-inner">
                        <ul>
                          <c:forEach var="record" items="${records}" varStatus="status">
                            <c:if test="${status.index <= 0}">
                              <li class="clearfix">
                                <span class="record-time"><fmt:formatDate value="${record.createTime}" pattern="yyyy-MM-dd mm:ss" /></span>
                                <div class="star-group">
                                  <c:forEach begin="1" end="3" varStatus="status">
                                    <i class="star ${status.index <= record.stars ? 'active' : ''}"></i>
                                  </c:forEach>
                                </div>
                              </li>
                            </c:if>
                          </c:forEach>
                        </ul>
                      </div>
                    </div>
                  </div>
                </div>
              </c:when>
            </c:choose>
            
            <div style="margin: 1rem .75rem; max-height: 10rem; overflow: scroll;">
              <p style="padding-bottom: 0px; margin: .4rem 0; text-align: left; color: #666; font-size: .6rem;">相关文章</p>
              <a href="http://mp.weixin.qq.com/s/oZe_q6QZGYux5x_IZdPH_w" style="text-decoration: underline; font-size: .6rem; color: #999; display: block; text-indent: 2em;">陆老师小课堂，口算练习</a>
            </div>
            
            <div class="oral-start-btn">
              <a href="javascript:void(0);" class="start-btn">开始</a>
            </div>
          </div>
          <p style="text-align: center; font-size: .6rem; color: #999; position: absolute; width: 100%; bottom: 0px;">陆老师小课堂（微信号：llsxkt）出品</p>
        </div>
      </div>
    </div>
  </div>
  
  
  <%@ include file="/WEB-INF/include/script.jsp"%>
  <d:resource type="script" root="${ctx.resource}/build" src="js/page/oral/view.js" />
  <script type="text/javascript">
      require(['page/oral/view'], function(page) {
        var sources = JSON.parse('${questions}');
        var round = JSON.parse('${roundString}');
        var jsConfig = JSON.parse('${jsConfig}');
        page.init({
          'jsConfig': jsConfig,
          'refresh': '${param.refresh}',
          'sources': sources,
          'round': round
        });
      })
  </script>
  
</body>
</html>